Upstream tarball 10026
[amule.git] / MSVC Solution / makeconfig.cmd
blob070b9134d23261aea0cb8d1791fbbb413d63f550
1 @echo off
2 echo #ifndef CONFIG_H>config.h
3 echo #define CONFIG_H>>config.h
5 rem Tarballs have a .svn-revision for identification
6 if not exist .svn-revision goto svn1
7 FOR /F %%i IN (.svn-revision) DO set svnv=%%i
8 goto :foundsvnversion
10 :svn1
11 rem Try to get version from a SVN working copy, svnversion must be in path
12 set svnv=exported
13 call svnversion >nul 2>&1
14 if errorlevel 1 goto nosvnversion
15 FOR /F %%i IN ('svnversion src') DO set svnv=%%i
16 if %svnv%==exported goto nosvnversion
18 :foundsvnversion
19 echo SVNDATE is %svnv%
20 echo #define SVNDATE "rev. %svnv%">>config.h
21 echo #define VERSION "SVN">>config.h
22 echo #define __PRERELEASE__>>config.h
23 goto finish
25 :nosvnversion
26 echo release build, version from ^<common/ClientVersion.h^>
27 echo #include ^<common/ClientVersion.h^> >>config.h
29 :finish
30 echo #define CRYPTOPP_INCLUDE_PREFIX ../cryptopp>>config.h
31 echo #define PACKAGE "amule">>config.h
32 echo #endif>>config.h